/********************************************************************************
do-file to replicate tables in:
	Chacon, Mario and Jeff Jensen. 2019. "Democratization, De Facto Power, and Taxation: 
	Evidence from Military Occupation during Reconstruction" World Politics 

data file needed: Dataset_1 (Main Panel) 
*/

clear all 
set more off

**Set Working Directory 
*cd "C:\****\ Replication Files (Chacon & Jensen, WP 2019)\Datasets\"

*** Online Appendix Table 5. Non-Occupied Neighbors Sample
use Dataset_1, clear 

global ldc lnTotPop1860 i_lnTotPop1860_DORecon ///
lnFarValRPc1860 i_lnFarValRPc1860_DORecon 

global ldc2 lnAgriGdpRPc1870 i_lnAgriGdpRPc1870_DORecon ///
lnManGdpRPc1870 i_lnManGdpRPc1870_DORecon

** State Rev. 
*1860-1870
reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if sample==1 & year==1870 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, St. Rev. 1860-70, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast replace 

reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1870 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, St. Rev. 1860-70, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

*1870-1890 
reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, St. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, St. Rev. 1870-90, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

** County 
reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, Coun. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, Coun. Rev. 1870-90, +1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

** Total Non-Federal 
reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 & ntc==1, r
outreg2 using Table_OA5.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline + GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

*** Online Appendix Table 6. Population-weigthed models 

*State
reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc st1-st16 if sample==1 & year==1870 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, St. Rev. 1860-70, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast replace 

reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1870 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, St. Rev. 1860-70, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, St. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, St. Rev. 1870-90, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

* County 
reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, Coun. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, Coun. Rev. 1870-90, +1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

* Total Non-Federal 
reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if sample==1 & year==1890 [aweight=lnTotPop1860], r
outreg2 using Table_OA6.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline + GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast


*** Table OA7. Sample with Urban counties 
 
*1860-1870
reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc st1-st16 if recon==1 & year==1870, r
outreg2 using Table_OA7.xls, ctitle("Table 3, St. Rev. 1860-70, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast replace 

reg del_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if recon==1 & year==1870, r
outreg2 using Table_OA7.xls, ctitle("Table 3, St. Rev. 1860-70, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

*1870-1890 
reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, St. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_state_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, St. Rev. 1870-90, + 1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, Coun. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_county_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, Coun. Rev. 1870-90, +1870 GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc  st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast

reg del2_ln_total_tax_real_pc i_black_sh_1860_DORecon black_sh_1860 d_occup_recon $ldc $ldc2 st1-st16 if recon==1 & year==1890, r
outreg2 using Table_OA7.xls, ctitle("Table 3, Tot. Rev. 1870-90, Baseline + GDP") keep(i_black_sh_1860_DORecon black_sh_1860 d_occup_recon) dec(3) noast
